package com.account.service;

import com.account.dao.AccountMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class AccountService2 {

    @Resource(name = "accountMapper")
    AccountMapper accountMapper;

    @Transactional
    public void testTransacation() throws  ArithmeticException{
        accountMapper.update(456498466,1);
        //int a=3/0;
        accountMapper.update(545745.0,4);
    }
}